package four.homework;

import four.FactoryExample.framework.Factory;
import four.FactoryExample.framework.Product;

import java.util.ArrayList;
import java.util.List;

public class PlayFactory extends Factory {
    protected List medias = new ArrayList();
    @Override
    protected Product createProduct(String media) {
        return new Player(media);
    }

    @Override
    protected void registerProduct(Product product) {
        medias.add(product);
    }
    public List getMedias(){return medias;}
}
